<?php
include_once 'init.php';
class TicketTests {
	
	public static function add() {
		$t = new Ticket ( );
		$desc = new TicketDescription ( );
		$desc->set ( "Nie dziala mi cos tam 2" );
		
		$t->setUsid ( 5 );
		$t->add ( $desc );
		
		TicketUtils::add ( $t );
	}
	
	public static function get() {
		TicketUtils::get ( 6 );
	}
	
	public static function del() {
		TicketUtils::removeById ( 1 );
	}
	
	public static function find() {
		
		$controls = new TicketSearchControls ( );
		$controls->setActive ( true );
		//$controls->setAssignSu( true );
		//$controls->setUserServiceId ( 3 );
		//$controls->setUserId ( 2 );
		TicketUtils::find ( $controls );
	}
	
	public static function assignSU() {
		TicketUtils::assignSuperUserById ( 6, 2 );
	}
	
	public static function modifyDesc(){
		$desc = new TicketDescription ( );
		$desc->set ( "Nie dziala mi internet szkoda co? " );
		$desc->setId(1);
		TicketUtils::modifyDescription($desc);
	}
	
	public static function addDesc(){
		$desc = new TicketDescription ( );
		$desc->set ( "To masz problem? " );
		$desc->setTid(6);
		$desc->setUserId(13);
		
		TicketUtils::addDescription($desc);
	}
	
	public static function delDesc(){
		TicketUtils::removeDescription(1);
	}
}

//TicketTests::add ();
//TicketTests::get();
//TicketTests::del();
TicketTests::find();
//TicketTests::assignSU();
//TicketTests::modifyDesc();
//TicketTests::addDesc();
//TicketTests::delDesc();
?>